<template>
  <div class="q-pa-md q-gutter-sm">
    <t-button label="关闭图标" color="primary" @click="icon = true" />
    <t-button label="带有工具栏" color="primary" @click="bar = true" />

    <t-dialog v-model:show="icon">
      <t-card>
        <t-card-section class="row items-center q-pb-none" style="display: flex;justify-content: space-between;">
          <div class="text-h6">点击关闭图标</div>
          <t-button icon="close" flat round dense  @click="icon = false" />
        </t-card-section>

        <t-card-section>
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum repellendus sit voluptate voluptas eveniet porro. Rerum blanditiis perferendis totam, ea at omnis vel numquam exercitationem aut, natus minima, porro labore.
        </t-card-section>
      </t-card>
    </t-dialog>

    <q-dialog v-model="bar" persistent>
      <q-card>
        <q-bar>
          <q-icon name="network_wifi" />
          <q-icon name="network_cell" />
          <q-icon name="battery_full" />
          <div>这是一条工具栏</div>

          <q-space />

          <q-btn dense flat icon="close" v-close-popup>
            <q-tooltip>Close</q-tooltip>
          </q-btn>
        </q-bar>

        <q-card-section>
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum repellendus sit voluptate voluptas eveniet porro. Rerum blanditiis perferendis totam, ea at omnis vel numquam exercitationem aut, natus minima, porro labore.
        </q-card-section>

        <q-card-section class="q-pt-none">
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum repellendus sit voluptate voluptas eveniet porro. Rerum blanditiis perferendis totam, ea at omnis vel numquam exercitationem aut, natus minima, porro labore.
        </q-card-section>
      </q-card>
    </q-dialog>
  </div>
</template>

<script>
import { ref } from 'vue'

export default {
  setup () {
    return {
      icon: ref(false),
      bar: ref(false)
    }
  }
}
</script>
